+2009-02-28 Matthias Clasen <mclasen@redhat.com>
+
+ Bug 573069 – Gdk-CRITICAL warnings with Gtk 2.14 when dragging
+ GtkNotebook tabs
+
+ * gtk/gtkwidget.c (_gtk_widget_synthesize_crossing): Be a little
+ more careful when navigating up the parent chain.
+
+ * gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): Reset the
+ pointer window thats stored on the screen when it is destroyed.
+
2009-02-27 Matthias Clasen <mclasen@redhat.com>
Bug 572996 – crash in Home Folder: Trying to open the sidebar
window->state = GDK_WINDOW_STATE_WITHDRAWN;
}
+static GQuark quark_pointer_window = 0;
+
static void
gdk_window_class_init (GdkWindowObjectClass *klass)
{
drawable_class->get_clip_region = gdk_window_get_clip_region;
drawable_class->get_visible_region = gdk_window_get_visible_region;
drawable_class->get_composite_drawable = gdk_window_get_composite_drawable;
+
+ quark_pointer_window = g_quark_from_static_string ("gtk-pointer-window");
}
static void
if (GDK_WINDOW_DESTROYED (window))
return;
+ screen = gdk_drawable_get_screen (GDK_DRAWABLE (window));
+ temp_window = g_object_get_qdata (G_OBJECT (screen), quark_pointer_window);
+ if (temp_window == window)
+ g_object_set_qdata (G_OBJECT (screen), quark_pointer_window, NULL);
+
switch (GDK_WINDOW_TYPE (window))
{
case GDK_WINDOW_ROOT:
- screen = gdk_drawable_get_screen (GDK_DRAWABLE (window));
if (!screen->closed)
{
g_error ("attempted to destroy root window");
if (GDK_WINDOW_DESTROYED (window))
return;
- paint.x_offset = x_offset;
- paint.y_offset = y_offset;
- paint.pixmap = redirect->pixmap;
- paint.surface = _gdk_drawable_ref_cairo_surface (redirect->pixmap);
-
clip_region = _gdk_window_calculate_full_clip_region (window,
GDK_WINDOW (redirect->redirected),
NULL, TRUE,
&x_offset, &y_offset);
-
+ paint.x_offset = x_offset;
+ paint.y_offset = y_offset;
+ paint.pixmap = redirect->pixmap;
+ paint.surface = _gdk_drawable_ref_cairo_surface (redirect->pixmap);
+
method.cr = NULL;
method.gc = NULL;
setup_backing_rect_method (&method, window, &paint, 0, 0);
while (from_ancestor != NULL)
{
- if (from_ancestor != NULL)
- {
- from_ancestor = gdk_window_get_parent (from_ancestor);
- if (from_ancestor == NULL)
- break;
- from_ancestors = g_list_prepend (from_ancestors, from_ancestor);
- }
+ from_ancestor = gdk_window_get_parent (from_ancestor);
+ if (from_ancestor == NULL)
+ break;
+ from_ancestors = g_list_prepend (from_ancestors, from_ancestor);
}
synth_crossing (from, GDK_LEAVE_NOTIFY, from_window,
while (to_ancestor != NULL)
{
- if (to_ancestor != NULL)
- {
- to_ancestor = gdk_window_get_parent (to_ancestor);
- if (to_ancestor == NULL)
- break;
- to_ancestors = g_list_prepend (to_ancestors, to_ancestor);
- }
- }
+ to_ancestor = gdk_window_get_parent (to_ancestor);
+ if (to_ancestor == NULL)
+ break;
+ to_ancestors = g_list_prepend (to_ancestors, to_ancestor);
+ }
/* XXX: leave/inferior on root window? */
from_ancestor = gdk_window_get_parent (from_ancestor);
if (from_ancestor == to_window)
break;
- from_ancestors = g_list_prepend (from_ancestors, from_ancestor);
+ if (from_ancestor)
+ from_ancestors = g_list_prepend (from_ancestors, from_ancestor);
}
if (to_ancestor != NULL)
{
to_ancestor = gdk_window_get_parent (to_ancestor);
if (to_ancestor == from_window)
break;
- to_ancestors = g_list_prepend (to_ancestors, to_ancestor);
+ if (to_ancestor)
+ to_ancestors = g_list_prepend (to_ancestors, to_ancestor);
}
}
if (to_ancestor == from_window)